package com.wysql.thread.zuse;

import java.util.concurrent.ArrayBlockingQueue;

public class Foodie extends Thread {
    private ArrayBlockingQueue<String> list;

    public Foodie(ArrayBlockingQueue<String> list) {
        this.list = list;
    }

    @Override
    public void run() {
        try {
            while (true) {
                String take = list.take();
                System.err.println("获取到了" + take);
            }
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
